﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QueryData;

internal class 结果投影
{
    void MyMethod()
    {
        using (var db = new BasicDbContext())
        {
            (from x in db.BasicEntities select new { x.Id, x.RowVersion }).ToList();

            db.BasicEntities.Select(x => new { x.Id, x.RowVersion, Utf8Bytes = Encoding.UTF8.GetBytes(x.Text) }).ToList();

        }
    }
}
